package rec.esiag.pds.beans;

import java.io.Serializable;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.Calendar;
import java.util.Date;

import esiag.pds.beans.IDLigne;
import esiag.pds.beans.IDStation;
import esiag.pds.beans.IDTrain;


public class Information implements Serializable {
	

	//private static final long serialVersionUID = -8081043390361258654L;
	
		
	protected Date date;
	protected IDTrain train;
	protected IDStation station;
	protected IDLigne ligne;
		
	
	public Information(){
		super();
		date=Calendar.getInstance().getTime();
		train=new IDTrain(0);
		station=new IDStation(0);
		ligne=new IDLigne(0);
	}

	public IDTrain getTrain() {
		return train;
	}

	public void setTrain(IDTrain train) {
		this.train = train;
	}

	public IDStation getStation() {
		return station;
	}

	public void setStation(IDStation station) {
		this.station = station;
	}

	public IDLigne getLigne() {
		return ligne;
	}

	public void setLigne(IDLigne ligne) {
		this.ligne = ligne;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Override
	public String toString() {
		return "Information [date=" + date + ", train=" + train + ", station="
				+ station + ", ligne=" + ligne + "]"+"totototot";
	}

	public void setIdTrain(int id){
	//	System.out.println("iciiiii "+id);
		train.setId(id);
	}
	
	public void setIdStation(int id){
		station.setId(id);
	}

	public void setIdLigne(int id){
		ligne.setId(id);
	}

	public Information getInformation() {
		// TODO Auto-generated method stub
		return this;
	}
	
}
